package com.lm.bootclient.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class ConsumeService {

    @Autowired
    RestTemplate restTemplate;

    public String requestServiceProvide(){
        return restTemplate.getForObject("http://SERVICE-RIBBON/ribbon",String.class);
    }

    public String requestServiceProvideHello(String name){
        return restTemplate.getForObject("http://SERVICE-RIBBON/hello?name="+name,String.class);
    }
}
